    <div class="container containerShadow">
        <div class="row">
            <div class="topimg">
                <div class="left pull-left">
                    <span>补充说明</span>
                </div>
                <!--<div class="pull-right">
                <a href="###">
                <img src="image/projectDetails/edit.png" >
                </a>
            </div>-->
            </div>
            <form action="" method="post" class="clearfix">
                <div class="clearfix">
                    <label for="" class="pull-left">法律依据</label>
                    <textarea name="" rows="" cols="" id="legal" class="pull-right textarea-edit7"><?= !empty($note['legal'])?$note['legal']:'';?></textarea>
                </div>
                <div class="clearfix">
                    <label for="" class="pull-left">处置方案</label>
                    <textarea name="" rows="" cols="" id="sell_plan" class="pull-right textarea-edit7"><?= !empty($note['sell_plan'])?$note['sell_plan']:'';?></textarea>
                </div>
                <div class="clearfix">
                    <label for="" class="pull-left">风险点</label>
                    <textarea name="" rows="" cols=""  id="risk_point" class="pull-right textarea-edit7"><?= !empty($note['risk_point'])?$note['risk_point']:'';?></textarea>
                </div>
                <div class="clearfix">
                    <label for="" class="pull-left">承债人现状</label>
                    <textarea name="" rows="" cols="" id="current_state" class="pull-right textarea-edit7"><?= !empty($note['current_state'])?$note['current_state']:'';?></textarea>
                </div>
                <div class="clearfix">
                    <label for="" class="pull-left">其他问题</label>
                    <textarea name="" rows="" cols="" id="other_problem" class="pull-right textarea-edit7"><?= !empty($note['other_problem'])?$note['other_problem']:'';?></textarea>
                </div>
                <div class="clearfix">
                    <label for="" class="pull-left">需再补充</label>
                    <textarea name="" rows="" cols="" id="more_problem" class="pull-right textarea-edit7"><?= !empty($note['more_problem'])?$note['more_problem']:'';?></textarea>
                </div>

                <div class="cancelInConfirm clearfix">
                    <!--<input id="confirm" type="submit" value="保存"/>-->
                    <input id="ajaxExplain" class="cancelInConfirmActive" type="button" value="保存" />
                    <input id='cancelExplain' type="button" value="取消" />
                </div>

            </form>

        </div>
    </div>
    <!-- textarea 高度设置对比div -->
	
	<div style="max-height: 1px; overflow: hidden;">
		
		<div id="d7" style="visibility:hidden;min-height: 80px;"></div>
	
	</div>
<script>
    $(function () {
        var legal = ''; //
        var sell_plan = ''; //
        var risk_point = ''; //
        var current_state = ''; //
        var other_problem = ''; //
        var more_problem = ''; //
        var data = {};
        $("#ajaxExplain").click(function () {
            legal = $("#legal").val();
            sell_plan = $("#sell_plan").val();
            risk_point = $("#risk_point").val();
            current_state = $("#current_state").val();
            other_problem = $("#other_problem").val();
            more_problem = $("#more_problem").val();
            data = {
                'legal':legal,
                'sell_plan':sell_plan,
                'risk_point':risk_point,
                'current_state':current_state,
                'other_problem':other_problem,
                'more_problem':more_problem,
                'project_id':project_id,
                'package_id':package_id,
            }
            $.post('/project/ajax-save-other-note-project',{'data':data},function (res) {
                var JSONData = JSON.parse(res)
                if (JSONData.code == 200){
                    layer.msg(JSONData.message);
                    siFaW();
                }else{
                    layer.msg(JSONData.message);
                }
            })
        })
        //-----------------渲染无编辑页面--------------------
        function siFaW() {
            $.get('/project/get-base-data',{'project_id':project_id,'postion':8},function (res) {
                $(".buChongShuoMingW").children().remove();
                $(".buChongShuoMingW").html(res);
                $(".buChongShuoMingEdit").hide();
                $(".buChongShuoMingW").show();
            })
        }
        //---取消按钮
        $("#cancelExplain").click(function () {
            $.post('/project/ajax-un-lock',{'postion':8,'project_id':project_id},function (res) {
                var JSONData = JSON.parse(res)
                if (JSONData.code == 200){
                    layer.msg(JSONData.message);
                }else{
                    layer.msg(JSONData.message);
                }
            })
            $(".buChongShuoMingEdit").hide();
            $(".buChongShuoMingW").show();
        })
         //textarea编辑高度和输入框高亮显示功能开始
		  $(document).on('focus','.textarea-edit7',function(){
		 	textareaHeight(this);
		 	$(this).css({
					"border":"1px solid #2194f1"
			})
		 })
		   $(document).on('blur','.textarea-edit7',function(){
		 	$(this).css({
					"border":"1px solid #e2e2e2"
			})
		 })
		  $(document).on('keyup','.textarea-edit7',function(){
	     	textareaHeight(this);
	     })
	     // textarea 高度展示问题和高亮显示结束
	     function textareaHeight(th){
    	 var val = $(th).val();
	      $("#d7").width($(th).width())
	      $("#d7").html("<pre>" +val+" "+"</pre>");
	      var h = $("#d7").height() ;
		      $(th).height(h);
		}
})
</script>
